com.justhis.jdo
Class JDOContext

java.lang.Object
  extended bycom.justhis.jdo.JDOContext

public class JDOContext
extends java.lang.Object

JDO????????????????JDO PersistenceManager ????Factory

Version:
$Revision: 1.1 $
Author:
acai

Method Summary
 void close()
          Close Context's instance.
static JDOContext getContext()
          Obtain instance of the Context for current thread.
 javax.jdo.PersistenceManager getPersistenceManager()
          Obtain this context's JDO persistence manager.
static void initialize(java.util.Properties props)
          Creates and configures PersistenceManagerFactory.
static java.util.Properties loadJDOProperties()
          Load the JDO configuration from the classpath.
static void shutdown()
          Shut down JDO engine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getContext

public static JDOContext getContext()
                             throws PropertiesFileReadException
Obtain instance of the Context for current thread.

Returns:
Current thread's context
Throws:
PropertiesFileReadException - if read JDO properties file happen error.

initialize

public static void initialize(java.util.Properties props)
Creates and configures PersistenceManagerFactory.

Parameters:
props - JDO configuration parameters

loadJDOProperties

public static java.util.Properties loadJDOProperties()
                                              throws PropertiesFileReadException
Load the JDO configuration from the classpath.

Returns:
PropertiesFileReadException if load properties error.
Throws:
PropertiesFileReadException

shutdown

public static void shutdown()
Shut down JDO engine


getPersistenceManager

public javax.jdo.PersistenceManager getPersistenceManager()
Obtain this context's JDO persistence manager.

Returns:
JDO persistence manager

close

public void close()
Close Context's instance. Closes its instance of PersistenceManager and removes reference to this instance from current thread.



Copyright © 2003 EastNetworks.Net(China)Co.,Ltd.. All Rights Reserved.